Information processing apparatus and cache control method

ABSTRACT

According to one embodiment, an information processing apparatus includes a storage device, a volatile memory, and a processor. The storage device includes a controller, a first nonvolatile storage module, and a second nonvolatile storage module whose access speed is higher than an access speed of the first nonvolatile storage module. The processor is configured to execute an operating system and a cache driver that are loaded into the volatile memory. The cache driver uses at least part of an area in the second nonvolatile storage module as a cache for the first nonvolatile storage module.

CROSS REFERENCE TO RELATED APPLICATIONS

This application This is a reissue of U.S. Pat. No. 8,677,061, issued onMar. 18, 2014, from U.S. patent application Ser. No. 13/333,795, whichis based upon and claims the benefit of priority from prior JapanesePatent Application No. 2011-124542, filed Jun. 2, 2011, the. The entirecontents of whichthe above-identified applications are incorporatedherein by reference.

FIELD

Embodiments described herein relate generally to an informationprocessing apparatus used as a cache device, and a cache control method.

BACKGROUND

A hybrid hard disk drive which comprises a hard disk drive and a flashmemory and which uses the flash memory as a cache device of the harddisk drive is on the market. The hybrid hard disk drive needs to beprovided with a controller having a high computing speed to performcache control.

BRIEF DESCRIPTION OF THE DRAWINGS

A general architecture that implements the various features of theembodiments will now be described with reference to the drawings. Thedrawings and the associated descriptions are provided to illustrate theembodiments and not to limit the scope of the invention.

FIG. 1 is an exemplary block diagram showing an example of theconfiguration of an information processing apparatus according to afirst embodiment.

FIG. 2 is an exemplary block diagram showing primary parts of theinformation processing apparatus according to the first embodiment.

FIG. 3 is an exemplary block diagram showing primary parts of aninformation processing apparatus according to a second embodiment.

FIG. 4 is an exemplary flowchart showing the procedure of processing ina control module and an H-HDD driver after power application, accordingto the second embodiment.

FIG. 5 is an exemplary flowchart showing the procedure of processingperformed by the H-HDD driver and the control module at shutdown,according to the second embodiment.

FIG. 6 is an exemplary flowchart showing the procedure of processing inthe control module in the case of read access when cache data is managedby the control module of an H-HDD, according to the second embodiment.

FIG. 7 is an exemplary flowchart showing the procedure of processing inthe control module in the case of write access when the cache data ismanaged by the control module of the H-HDD, according to the secondembodiment.

FIG. 8 is an exemplary block diagram showing the configuration ofprimary parts of an information processing apparatus according to athird embodiment.

FIG. 9 is an exemplary flowchart showing the procedure of processing inan H-HDD driver and a control module at startup, according to the thirdembodiment.

FIG. 10 is an exemplary flowchart showing the procedure of processing inthe H-HDD driver and the control module at startup, according to thethird embodiment.

FIG. 11 is an exemplary flowchart showing the procedure of processing inthe H-HDD driver and the control module at normal shutdown, according tothe third embodiment.

FIG. 12 is an exemplary block diagram showing primary parts of aninformation processing apparatus according to a fourth embodiment.

FIG. 13 is an exemplary diagram showing an example of cache managementinformation generated by an H-HDD driver of the information processingapparatus according to the fourth embodiment.

FIG. 14 is an exemplary diagram showing an example of a cache directoryin the cache management information.

FIG. 15 is an exemplary diagram showing an example of tag data in thecache directory.

FIG. 16 is an exemplary flowchart showing the procedure of processing ina control module in the case of read access when cache data is managedby a control module of an H-HDD, according to the second embodiment.

FIG. 17 is an exemplary block diagram showing primary parts of aninformation processing apparatus according to a fifth embodiment.

FIG. 18 is an exemplary diagram showing an example of cache managementinformation generated by an H-HDD driver of the information processingapparatus according to the fifth embodiment.

FIG. 19 is an exemplary diagram showing an example of tag data accordingto the fifth embodiment.

FIG. 20 is an exemplary flowchart showing an example of a cache controlmethod using the H-HDD driver according to the fifth embodiment.

FIG. 21 is an exemplary block diagram showing an example of primaryparts of an information processing apparatus according to a seventhembodiment.

FIG. 22 is an exemplary diagram showing an example of tag data in cachemanagement information managed by an H-HDD driver according to theseventh embodiment.

FIG. 23 is an exemplary block diagram showing an example of theconfiguration of an information processing apparatus according to aneighth embodiment.

FIG. 24 is an exemplary block diagram showing an example of primaryparts of the information processing apparatus according to the eighthembodiment.

FIG. 25 is an exemplary flowchart showing an example of the procedure ofprocessing in a controller and a USB-HDD driver after power application,according to the eighth embodiment.

FIG. 26 is an exemplary block diagram showing an example of primaryparts of an information processing apparatus according to a ninthembodiment.

FIG. 27 is an exemplary diagram showing an example of trace managementinformation according to the ninth embodiment.

FIG. 28 is an exemplary flowchart showing an example of the procedure ofprocessing performed by a controller according to the ninth embodiment.

FIG. 29 is an exemplary flowchart showing an example of the procedure ofprocessing performed by a cache driver according to the ninthembodiment.

FIG. 30 is an exemplary block diagram showing an example of primaryparts of an information processing apparatus according to a modificationof the ninth embodiment.

FIG. 31 is an exemplary block diagram showing an example of primaryparts of an information processing apparatus according to a tenthembodiment.

FIG. 32 is an exemplary diagram showing an example of trace managementinformation according to the tenth embodiment.

FIG. 33 is an exemplary flowchart showing an example of the procedure ofprocessing performed by a controller according to the tenth embodiment.

FIG. 34 is an exemplary flowchart showing an example of the procedure ofprocessing performed by a cache driver according to the tenthembodiment.

DETAILED DESCRIPTION

Various embodiments will be described hereinafter with reference to theaccompanying drawings.

In general, according to one embodiment, an information processingapparatus comprises a storage device, a volatile memory, and aprocessor. The storage device comprises a controller, a firstnonvolatile storage module, and a second nonvolatile storage modulewhose access speed is higher than an access speed of the firstnonvolatile storage module. The processor is configured to execute anoperating system and a cache driver that are loaded into the volatilememory. The cache driver uses at least part of an area in the secondnonvolatile storage module as a cache for the first nonvolatile storagemodule.

FIG. 1 is a diagram showing a system configuration of an informationprocessing apparatus according to an embodiment. The informationprocessing apparatus according to the present embodiment is provided asa personal computer.

As shown in FIG. 1 , this information processing apparatus comprises acentral processing unit (CPU) 11, a memory controller hub (MCH) 12, amain memory (volatile memory) 13, an I/O controller hub (ICH) 14, agraphic processing unit (GPU) 15, a video memory (VRAM) 15A, a soundcontroller 16, a BIOS read only memory (BIOS-ROM) 17, a hybrid hard diskdrive (H-HDD) (storage device) 18, an optical disc drive (ODD) 20,various peripheral devices 21, an electrically erasable programmable ROM(EEPROM) 22, and an embedded controller/keyboard controller (EC/KBC) 23.

The CPU 11 is a processor for controlling the operation of thisinformation processing apparatus, and executes various programs loadedinto the main memory 13 from the H-HDD 18 and the ODD 20. The variousprograms to be executed by the CPU 11 include an OS 110 for resourcemanagement, and an H-HDD driver (cache driver) 120 and variousapplication programs 130 that are operated under the OS 110. The H-HDDdriver 120 is a program for controlling the H-HDD 18. This informationprocessing apparatus uses, as a cache for an HDD 18B, a solid statedevice (SSD) (second nonvolatile storage module) 18C higher in accessspeed than the HDD 18B (first nonvolatile storage module) within theH-HDD 18 for faster access to the HDD 18B. The SSD 18C comprises a flashmemory.

The CPU 11 also executes a BIOS stored in the BIOS-ROM 17. The BIOS is aprogram for hardware control. The BIOS which is stored in the BIOS-ROM17 may also be hereinafter referred to as the BIOS 17.

The MCH 12 acts as a bridge that connects the CPU 11 to the ICH 14, andalso acts as a memory controller for access control of the main memory13. The MCH 12 functions to communicate with the GPU 15.

The GPU 15 is a display controller for controlling a display devicewhich is incorporated in this information processing apparatus or whichis externally connected. The CPU 15 has the VRAM 15A, and is equippedwith an accelerator for drawing an image to be displayed by the variousprograms on behalf of the CPU 11.

the ICH 14 includes therein an AT attachment (ATA) controller forcontrolling the H—HDD 18 and the ODD 20. The ICH 14 controls the variousperipheral devices 21 connected to a peripheral component interconnect(PCI) bus. The ICH 14 also functions to communicate with the soundcontroller 16.

The H-HDD 18 has a control module 18A, the HDD 18B, and the SSD 18C. Thecontrol module accesses the HDD 18B and the SSD 18C in accordance withan instruction from the ATA controller.

The sound controller 16 is a sound device, and outputs audio data to bereproduced by the various programs to, for example, a speaker which isincorporated in this information processing apparatus or which isexternally connected.

The EEPROM 22 is a memory device for storing, for example, individualinformation for this information processing apparatus and environmentalsetting information. The EC/KBC 23 is a one-chip micro processing unit(MPU) which is an integration of an embedded controller for powercontrol and a keyboard controller for controlling data input performedby operating a keyboard and a pointing device.

Now, the functions of the H-HDD 18 and the H-HDD driver 120 aredescribed with reference to FIG. 2 . FIG. 2 is a block diagram showingprimary parts of the information processing apparatus shown in FIG. 1 .

An information processing apparatus 10 is controlled by the operatingsystem (OS), and the H-HDD 18 is accessed from the operating system 110entirely via the H-HDD driver 120. The H-HDD driver 120 directly orindirectly controls an ATA controller 14A. The H-HDD 18 is connected tothe H-HDD driver 120 via the ATA controller 14A. The H-HDD driver 120accesses the main memory 13 via a memory controller 12A for data.

The H-HDD driver 120 is loaded into the main memory 13 at startup of asystem. The H-HDD driver 120 secures an area for storing cachemanagement information 201 in the main memory 13, and initializes thisarea so that nothing is recorded in cache data 212, and then startscache control processing. The cache management information 201 has datafor managing cache data such as a cache directory. In operation, theH-HDD driver 120 records, in the cache management information 201 withinthe main memory 13, data for managing learned data in a write cache anda read cache. At shutdown, the H-HDD driver 120 destroys the cachemanagement information 201 in the main memory 13.

Before the H-HDD driver 120 starts operation, the BIOS program controlsthe H-HDD 18. In response to a write access request or a read accessrequest from a host, the control module 18A. accesses the hard diskdrive 188.

The H-HDD 18 is recognized as a single storage device (HDD 18B) by theoperating system 110. The area in the SSD 18C is partly or entirely usedas a cache for the HDD 18B. The operating system 110 cannot directlyaccess the cache data area 212 of the SSD 18C used as an area forstoring cache data.

According to the present embodiment, the driver 120 executed by the CPU11 is used for cache control, such that the decrease of access speed canbe inhibited even if the control module 18A having a low computing speedis used in the H-HDD 18.

Second Embodiment Inhibition of Shortening of SSD Life

In the first embodiment, the cache management information 201 isdestroyed at every startup. Therefore, cache data is written in thecache data area 212 at every startup, so that the life of the SSD isshortened. If it can be ensured that the cache data area 212 correspondsto data in the H-HDD 18 at startup, the cache data area 212 can be usedwithout being destroyed by saving the cache management information 201in a nonvolatile storage region and loading the cache managementinformation 201 at startup, and the performance of the H-HDD 18 can beimproved. in this embodiment, how the shortening of the life of the SSDis inhibited and the performance of the H-HDD can be improved isdescribed.

The functions of an H-HDD 18 and an H-HDD driver according to thepresent embodiment are described with reference to the block diagramshown in 3. FIG. 3 is a block diagram showing primary parts of aninformation processing apparatus according to the second embodiment.

An H-HDD driver 320 is loaded into a main memory 13 at startup of asystem, and cache management information 211 stored in an SSD 18C isstored in the main memory 13 as cache management information 201, andthen operation is started. The cache management information 211 has datafor managing cache data such as a cache directory. In operation, theH-HDD driver 320 records, in the cache management information 201 withinthe main memory 13, learned data in a write cache and a read cache. Atshutdown, the H-HDD driver 320 stores, in the H-HDD 18, the cachemanagement information 201 within the main memory 13 as the cachemanagement information 211.

Before the H-HDD driver 320 starts operation, a BIOS program controlsthe H-HDD 18. When accessed from a host, a control module 18A refers tothe cache management information 211 to judge whether data is learned.At the start of operation of the H-HDD driver 320, a driver operationstart notification is issued to the H-HDD 18.

The H-HDD 18 is recognized as a single storage device (HDD 18B) by anoperating system 110. The area in the SSD 18C is partly or entirely usedas a cache for the HDD 18B. The operating system 110 cannot directlyaccess a cache data area 312 of the SSD 18C used as an area for storingcache data.

The control module 18A in the H-HDD 18 does not have a learning functionto store cache data in the SSD 18C, but has a function of managing thecache data stored in the SSD 18C, that is, a judgment function ofjudging whether an access request from the host hits the cache data, afunction of reading data from the cache data when the access requesthits the cache data, a function of invalidating particular data in thecache data, and a function of updating management data in the cache.

After power application, the control module 18A of the H-HDD 18 managesthe cache data in the SSD 18C before the driver operation startnotification is issued. In a period in which the control module 18Amanages the cache data, the BIOS which is not involved with the cache isin operation on the side of the host. If a read access request from thehost hits the cache data in the SSD 18C, the control module 18A readsdata from the SSD 18C. If the read access request misses the cache data,the control module 18A reads data from the HDD 18B. If a write requesthits the cache data, the control module 18A invalidates the data in thecache data, and writes the data in the HDD 18B regardless of whether thewrite request hits or misses the cache. In response to the driveroperation start notification from the host, the cache management isgiven up.

After the start of operation of the driver, the H-HDD driver 320controls anti manages the cache data in the SSD 18C. The H-HDD driver320 stores data in the cache, replaces data, and updates the managementdata when necessary.

The operations of the control module 18A and the H-HDD driver 320 afterpower application are described with reference to the flowchart in FIG.4 .

When power is applied, the control module 18A starts the management ofthe cache data in the SSD 18C (block 401). When the H-HDD driver 320 isloaded into the main memory 13 and the H-HDD driver 320 is ready forprocessing, the H-HDD driver 320 issues a driver operation startnotification to the control module 18A (block 402). On receipt of thedriver operation start notification, the control module 18A stops themanagement of the cache data (block 403). The control module 18A issuesa management operation stop notification to the H-HDD driver 320 (block404). On receipt of the management operation stop notification, theH-HDD driver 320 issues a request for read access to the cachemanagement information 211 to the control module 18A (block 405). Inresponse to the request, the control module 18A transfers the cachemanagement information 211 to the H-HDD driver 320 (block 406). TheH-HDD driver 320 stores the transferred cache management information 211in the main memory 13 as the cache management information 201 (block407). After storing the cache management information 201, the H-HDDdriver 320 starts the management of the cache data in the hard diskdrive 18B (block 408).

Now, the processing performed by the H-HDD driver 320 and the controlmodule 18A at shutdown is described with reference to the flowchart inFIG. 5 .

When a shutdown notification is received from the operating system 110,the H-HDD driver 320 requests the control module 18A to gain writeaccess to the SSD 18C of the cache management information 201 (block501). The control module 18A writes the cache management information 201into the SSD 180 as the cache management information 211 (block 502).After the end of writing, the control module 18A notifies the H-HDDdriver 320 of the end of writing of the cache management information 211(block 503). The H-HDD driver 320 notifies the operating system 110 thatthe shutdown is ready (block 504).

Now, the operation of the control module 18A in the case of read accesswhen the cache data is managed by the control module 18A of the H-HDD 18is described with reference to the flowchart in FIG. 6 .

In response to read access from the host, the control module 18A judgeswhether the accessed data is learned in the cache data (block 601). Whenit is judged that the accessed data is learned (hit) (Yes in block 601),the control module 18A reads the learned data from the SSD 18C (block602), and transfers the read data to the host (block 604). When it isjudged that the accessed data is not learned (miss) (No in block 601),the control module 18A reads the read-accessed data from the HDD 18B(block 603), and transfers the read data to the host (block 604).

Now, the operation of the control module 18A in the case of write accesswhen the cache data is managed by the control module 18A of the H-HDD 18is described with reference to the flowchart in FIG. 7 .

In response to write access from the host, the control module 18A.judges whether the accessed data is learned in the cache data (block701). When it is judged that the accessed data is learned (hit) (Yes inblock 701), the control module 18A invalidates the accessed data fromthe cache data in the SSD 18C (block 702), and writes the data into theHDD 18B (block 703). When it is judged that the accessed data is notlearned (miss) (No in block 701), the control module 18A writes the datainto the HDD 18B (block 703).

The cache control in the H-HDD 18 is limited to the period (BIOS controlperiod) up to the start of operation of the H-HDD driver 320 after powerapplication, and the functions are also limited (no learning function),so that the load of the cache control on the H-HDD 18 is reduced. Afterthe start of operation of the OS, the H-HDD driver 320 entirely controlsthe cache. Thus, a CPU 11 having high processing power and anintermediate buffer memory that is secured in the main memory 13 make itpossible to enhance performance and inhibit a cost rise.

Third Embodiment Adaptation to Reboot without Power-Off

In the case of reboot without power-off, a control module 18A of anH-HDD 18 cannot recognize that the host has rebooted. Therefore, even ifthe host is rebooted, the control module 18A of the H-HDD 18 cannotmanage the cache data. In the present embodiment, how the control module18A of the H-HDD 18 recognizes reboot without normal power-off and howthe control module 18A can manage the cache data after the reboot aredescribed.

FIG. 8 is a block diagram showing the configuration of primary parts ofan information processing apparatus according, to the third embodiment.

An H-HDD driver 120 secures an area for writing, in a binary form, amanager flag 813 that indicates a cache manager, in the nonvolatilememory of the H-HDD 18, for example, in an SSD 18C. Written into themanager flag 813 are a value corresponding to “HHDD” indicating that themanager is the control module 18A, and a value corresponding to “DRVR”indicating that the manager is the H-HDD driver 120, The H-HDD driver120 and the control module 18A can refer to and change the value of themanager flag 813. The initial value of the manager flag 813 is “DRVR”.

The control module 18A of the H-HDD 18 refers to the value of themanager flag 813 at the time of power application and at the time ofresetting. When the value is “HHDD”, the control module 18A manages thecache data described in the first embodiment before a driver operationstart notification is received. When the value is “DRVR”, the controlmodule 18A does not manage the cache. The reset notification is issuedto the H-HDD 18 from the host at least at the time of reboot (the resetnotification may also be issued while the host is in operation).

The control module 18A does not manage the cache when the value of theflag is “DRVR”. The reason for this is that there can be aninconsistency between the cache data in a cache data area 212 within theSSD 18C and the cache management information 211 having a cachedirectory at the time of reboot that does not go through normal shutdownof the operating system 110, for example, forced reboot or reboot afterthe crash of the operating system 110 except for resetting during normaloperation.

When the control module 18A of the H-HDD 18 receives the driveroperation start notification, the cache management is given up after thevalue of the manager flag 813 is rewritten to “DRVR”. The H-HDD driver120 also refers to the value of the manager flag 813 at the start ofoperation. When the value is “HHDD”, the H-HDD driver 120 validates thedata in the cache data area 212, and then reads the cache managementinformation 211 in the SSD 18C into the area of the cache managementinformation 201 of a main memory 13. When the value is “DRVR”, the H-HDDdriver 120 initializes the cache management information 201 of the mainmemory 13 so that nothing is recorded in the cache data area 212. Here,the H-HDD driver 120 invalidates the data in the cache data area 212when the value of the manager flag 813 is “DRVR”. This means theoccurrence of reboot that does not go through normal shutdown of theoperating system 110, for example, forced reboot or reboot after thecrash of the operating system 110, which is attributed to the fact thatthere is an inconsistency between the data in the cache data area 212and the cache management information 211 including the cache directory.

The H-HDD driver 120 changes the value of the manager flag 813 to “HHDD”at normal shutdown processing.

The procedure of processing in the H-HDD driver 120 and the controlmodule 18A at startup is described with reference to the flowcharts inFIG. 9 and FIG. 10 .

After startup, the control module 18A refers to the value of the managerflag 813 (block 901A). The control module 18A judges whether the valueof the manager flag 813 is “HHDD” (block 902A). When it is judged thatthe value is “HHDD” (Yes in block 902A), the control module 18A startsthe management of the cache data in the SSD 18C (block 903).

When the H-HDD driver 120 is loaded into the main memory 13 and theH-HDD driver 120 is ready to perform processing, the H-HDD driver 120refers to the value of the manager flag 813 (block 901B). When it isjudged that the value is “HHDD” (Yes in block 902B), the H-HDD driver120 issues a driver operation start notification to the control module18A (block 904).

On receipt of the driver operation start notification, the controlmodule 18A stops the management of the cache data (block 905). Thecontrol module 18A rewrites the value of the manager flag 813 to “DRVR”(block 906). The control module 18A issues a management operation stopnotification to the H-HDD driver 120 (block 907). On receipt of themanagement operation stop notification, the H-HDD driver 120 issues, tothe control module 18A, a request for read access to the cachemanagement information 211 (block 908). In response to the request, thecontrol module 18A transfers the cache management information 211 to thearea in the cache management information 201 of the main memory 13(block 909). After reading the cache management information 201, theH-HDD driver 120 starts the management of the cache data in the harddisk drive 18B (block 911).

When it is judged in blocks 902A and 902B that the value is not “HHDD”(No in blocks 902A and 902B), the H-HDD driver 120 initializes the cachemanagement information 201 in the main memory 13 (block 924).

Now, the procedure of processing performed by the H-HDD driver 120 andthe control module 18A at normal shutdown are described with referenceto FIG. 11 .

When a shutdown notification is received from the operating system 110,the H-HDD driver 120 stops the cache control processing (block 1101).The H-HDD driver 120 requests the control module 18A to gain writeaccess to the SSD 18C of the cache management information 201 (block1102). The control module 18A writes the cache management information201 into the SSD 18C as the cache management information 211 (block1103). After the end of writing, the control module 18A notifies theH-HDD driver 120 of the end of writing of the cache managementinformation 211 (block 1104).

The H-HDD driver 120 commands the control module 18A to rewrite thevalue of the manager flag 813 to “HHDD” (block 1105). The control module18A rewrites the value of the manager flag 813 to “HHDD” (block 1106).After rewriting, the control module 18A notifies that the rewriting hasbeen completed (block 1107). After the reception of the notification,the H-HDD driver 120 notifies the operating system 110 that shutdown isready (block 1109).

In the present embodiment, when the apparatus is improperly shut down,the cache management information 211 is destroyed, and the cache ismanaged on the basis of the initialized cache management information201. It is therefore possible to cope with reboot without normalpower-off.

Fourth Embodiment Faster Startup

In the present embodiment, how to speed up the startup is described.

The functions of an H-HDD 18 and an H-HDD driver according to the fourthembodiment are described with reference to the block diagram shown inFIG. 12 . FIG. 12 is a block diagram showing primary parts of aninformation processing apparatus according to the fourth embodiment.

Cache management information 1201 (1211) generated by an H-HDD driver1220 according to we present embodiment has management data 1301 and acache directory 1302, as shown in FIG. 13 . A later-described trace area1301A is secured in the management data 1301.

The H-HDD driver 1220 according to the present embodiment uses a 16-wayset associative method as an example of a cache method. The cachedirectory 1302 in the cache management information 1201 (1211) is, forexample, a table including 512 K indexes×16 ways, as shown in FIG. 14 .Tag data managed by the cache directory 1302 comprises a tag 1501 andother management data 1502, as shown in FIG. 15 . A quotient obtainedwhen the LBA of an HHD 18B is divided by the number of indexes is Tag,and the remainder is Index.

The H-HDD driver 1220 provides a startup flag 1501A in the managementdata 1502 in each tag data 1500 managed by the cache directory. Thevalue of the startup flag is “0” or “1”. The value “1” of the startupflag 1501A indicates the tag data 1500 corresponding to the cache datathat has been used at startup. The value “0” of the startup flag 1501Aindicates the tag data 1500 that has not been used at startup.

The H-HDD driver 1220 also secures a trace area 1301A in the managementdata 1301 within the cache management information 1201 (1211). A controlmodule 18A of the H-HDD 18 and the H-HDD driver 1220 can refer to andchange the trace area 1301A. Moreover, a startup completion notificationis issued to the H-HDD driver 1220 from an unshown program whichoperates when the start of an operating system 110 is completed.

When the control module 18A of the H-HDD 18 manages cache data, thecontrol module 18A rewrites the value of the startup flag 1501A of thetag data corresponding to the hit cache data in the cache directory to“1” if the cache data hits a read access request. When the cache datamisses the read access request, the control module 18A stores parameters(LBA, the number of sectors) of the read access request in the tracearea 1301A in the cache management information 1211.

After the start of operation, the H-HDD driver 1220 refers to the tracearea 1301A in the cache management information 1211, and stores, in theSSD 18C as cache data, the data read by the BIOS before the start ofoperation of the H—HDD driver 1220, and then sets, to “1”, the vain ofthe startup flag of the tag data corresponding to the cached data in thecache directory.

The H-HDD driver 1220 controls the cache corresponding to the tag datahaving the startup flag “1” in the cache directory so that the cachedoes run out of the cache data area 212.

When the cache management information 1201 including the cache directoryin the main memory 13 is saved in the SSD 18C as the cache managementinformation 1211 at shutdown, the H-HDD driver 1220 sets the values ofall the startup flags in the cache directory to “0”.

Now, the operation of a control module 1218A in the case of read accesswhen the cache data is managed by the control module 18A of the H-HDD 18is described with reference to the flowchart in FIG. 16 .

In response to read access from a host, the control module 1218A judgeswhether the accessed data is learned in the cache data (block 1601).When it is judged that the accessed data is learned (hit) (Yes in block1601), the control module 1218A rewrites the value of the startup flag1501A of the tag data corresponding to the hit cache data in the cachedirectory to “1” (block 1602). The control module 1218A reads thelearned data from the SSD 18C (block 1603), and transfers the read cachedata to the host (block 1604).

When it is judged that the accessed data is not learned (miss) (No inblock 1601), the control module 1218A writes parameters (LBA, the numberof sectors) of the read access request in the trace area 1301A in thecache management information 1211 (block 1605). The control module 1218Areads the read-accessed data from the hard disk drive 188 (block 1606),and transfers the read data to the host (block 1604).

The present embodiment contributes to faster startup of the wholesystem. The same data is often read at startup every time, but the data(place) to be read may vary at every startup. The advantage of thepresent embodiment is that data used for startup is learned at everystartup so that it is possible to adapt to the variation of data read atstartup.

The control module 1218A of the H-HDD 18 maintains simple processing toonly record a command for the read access request in the trace area1301A when the read request misses the cache, and thereby reduces theload on the control module 1218A.

Fifth Embodiment Restriction of Learned Data at Startup

According to the embodiments described above, the data learned atstartup is not deleted. Therefore, if much data is learned at startup,the area in the cache data area 212 available during operation isreduced, and sufficient cache effects cannot be obtained. In the presentembodiment, how to restrict the amount of data learned at startup isdescribed.

FIG. 17 is a block diagram for explaining the functions of an H-HDD 18and an H-HDD driver according to the fifth embodiment. FIG. 17 is ablock diagram showing primary parts of an information processingapparatus according to the fifth embodiment.

Cache management information 1701 (1711) generated by an H-HDD driver1720 according to the present embodiment has management data 1801 and acache directory 1302, as shown in FIG. 18 . As in the fourth embodiment,a trace area 1801A is secured in the cache management information 1701(1711). A startup flag 1902A and an LRU counter 1902B are provided inmanagement data 1902 of each tag data 1900 managed by the cachedirectory 1302. The LRU counter 1902B is a field for recording the orderof accesses in the same index. For example, in the case of 16 ways, whenthe LRU counter 1902B indicates 0, the corresponding data has been mostrecently accessed. When the LRU counter 1902B indicates 15, thecorresponding data has been accessed earliest. When a control module1718A manages the cache data, the control module 1718A rewrites thevalue of the startup flag 1902A in the cache directory 1302 to “1” andupdates the LRU counter 1902B of the same index if the cache data hits aread access request. When the cache data misses the read access request,the control module 1718A records parameters (LBA, the number of sectors)1801B of the read access request in the trace area 1801A. in the orderof reading.

The H-HDD driver 1720 restricts the amount of tag data for which thevalue of the startup flag is “1” to a predetermined amount, for example,to an amount corresponding to 4 ways equal to one fourth of 16 ways, inthe case of 16 ways. The H-HDD driver 1720 performs control inaccordance with the LRU counter 1902B so that data of earlier accessdates remain in the cache data area 212.

Now, how to manage the cache by the H-HDD driver 1220 is described withreference to the flowchart in FIG. 20 .

The H-HDD driver 1720 calculates, index by index in the cache directory,the number of tag data for which the value of the startup flag 1902A is“1” (block 2001). The H-HDD driver 1720 judges, index by index, whetherthe number of tag data for which the value of the startup flag 1902A is“1” is more than a set number (block 2002). When judging that the numberof tag data is more than the set number (Yes in block 2002), the H-HDDdriver 1720 refers to the LRU counter 1902B and then sets, to “0”, thevalue of the startup flag 1902A for the tag data of the latest accessdate among tag data for which the value of the startup flag 1902A is “1”in the same cache directory of the same index (block 2009). The H-HDDdriver 1720 performs processing from block 2001.

When judging that the number of tag data is not more than the set number(No in block 2002), the H-HDD driver 1720 sequentially processes thetraces in the trace area 1801A from the head. The H-HDD driver 1720judges whether a parameter 1801B is present in the trace area 1801A(block 2003). When judging that the parameter 1801B is present (Yes inblock 2003), the H-HDD driver 1720 calculates an index from theparameter in the trace area, and calculates the number of tag data forwhich the value of the startup flag is “1” in the corresponding index inthe cache directory (block 2004). The H-HDD driver 1720 judges whetherthe number of tag data is equal to the set number (block 2005). Whenjudging that the number of tag data is not equal to the set number (Yesin block 2005), the H-HDD driver 1720 destroys the parameter 1801B inthe trace area 1801A (block 2010).

When judging that the number of tag data is equal to the set number (Yesin block 2005), the H—HDD driver 1720 reads, from an HDD, datacorresponding to the parameter being processed (block 2806). The H-HDDdriver 1720 refers to the LRU counter in the same index and thenreplaces the oldest cache data for which the value of the startup flagis “0” with the data read from the HDD (block 2007). The H-HDD driver1720 sets the value of the startup flag of the tag data corresponding tothe replaced data to “1”, and then adds the tag data to the cachedirectory (block 2008). After block 2008, the H-HDD driver 1720 performsprocessing in and after block 2003. When judging that the parameter1801B is not present (No in block 2003), the H-HDD driver 1720 ends theprocessing.

After the completion of the processing of the trace data, the H-HDDdriver 1720 does not change the value of the startup flag until astartup completion notification to the driver is received. If a readrequest from an operating system hits the cache and the number of tagdata for which the value of the startup flag is “1” in the same index isequal to the set number. If the number of tag data for which the valueof the startup flag is “1” in the same index is different from (smallerthan) the set number, the H-HDD driver 1720 changes the value of thestartup flag to “1”. When the read request from the operating systemmisses the cache and the data read from the HDD is registered in thecache, the H-HDD driver 1720 sets the value of the startup flag to “0”if the number of tag data for which the value of the startup flag is “1”in the same index is equal to the set number. If the number of tag datafor which the value of the startup flag is “1” in the same index isdifferent from (smaller than) the set number, the H-HDD driver 1720 setsthe value of the startup flag to “1”.

The present embodiment ensures that a given amount of cache data or morecan be secured even in normal operation when the startup completionnotification to the driver is not issued for some reason or when theamount of reading is more than expected.

Sixth Embodiment Write Data at Boot is Deleted from the Cache Data

In the present embodiment, how to leave minimum data that is unlikely tobe read at the next startup is described.

The configurations of an H-HDD driver and a control module according tothe present embodiment are similar to those in the fourth embodiment,and are therefore not shown.

When there is a request for write access to cache data corresponding totag data for which the value of a startup flag is “1”, an H-HDD driver1220 sets the value of the startup flag to “0”. Cache data read-accessedat startup and then write-accessed is not likely to be read at the nextstartup. Even if the cache data corresponding to the tag data for whichthe value of the startup flag is “0” is deleted, there is no increase inboot time.

When a write access request corresponds to data that corresponds to aparameter in a trace area, a control module 1218A of an H-HDD 18 maydelete this parameter at startup.

According to the present embodiment, the read-accessed cache data isdeleted to sort the cache data and inhibit the increase of the boottime.

Seventh Embodiment Another HDD is Targeted for Cache

FIG. 21 is a block diagram showing primary parts of an informationprocessing apparatus according to the seventh embodiment.

An H-HDD driver according to the present embodiment uses at least partof the area in an SSD 18C as a cache for an HDD 18B and an HDD 2130.

Tag data in cache management information 2011 (2111) managed by an H-HDDdriver 2120 is described with reference to FIG. 22 . An HDD_ID 2202A foridentifying an HDD to be learned is recorded in management data 2202within tag data 2200. The number of bits in the HDD_ID 2202A is set whencache management information 2101 is created.

According to the present embodiment, not only the HDD 18B of an H-HDD 18but also the additional HDD 2130 connected to the information processingapparatus to which the H-HDD 18 is connected is improved in performance.For example, if a USB-HDD that uses the H-HDD according to the presentapplication is connected to the information processing apparatus, theHDD included in the information processing apparatus is also increasedin speed.

Eighth Embodiment HDD and SSD are Shown to be Independent

According to the present embodiment, there are provided a first storagedevice (HDD) Such as a magnetic disc that is relatively high incapacity, less expensive, low in speed, and high in power consumption,and a second storage device (SSD) such as a semiconductor nonvolatilememory that is relatively low in capacity, expensive, high-speed, andlow in power consumption. External storage device control means (HDDdriver) that operates on a computer system (PC) to which an externalstorage device is connected uses the SSD as a cache for the HDD. Thus, astorage system which is relatively high in capacity, less expensive,high-speed, and low in power consumption is provided.

In the seventh embodiment and the preceding embodiments, the H-HDDcomprising the HDD and the SSD is shown as a single storage device tothe host. In the present embodiment, the HDD and the SSD are shown asindependent storage devices to the host. In the present embodiment, evenan OS that can only issue one command to the same device at the sometime can issue commands to both the HDD and the SSD at the same time.

FIG. 23 is a diagram showing a system configuration of an informationprocessing apparatus according to the eighth embodiment. The informationprocessing apparatus according to the present embodiment is provided asa personal computer.

As shown in FIG. 23 , this information processing apparatus comprises aCPU 11, an MCH 12, a main memory 13, an ICH 14, a GPU 15, a VRAM 15A, asound controller 16, a BIOS-ROM 17, an HDD 2318, an ODD 20, variousperipheral devices 21, an EEPROM 22, and an EC/KBC 23.

The CPU 11 is a processor for controlling the operation of thisinformation processing apparatus, and executes a cache driver 2320loaded into the main memory 13. The cache driver 2320 is a program forcontrolling the HDD 2318 and a USB-HDD 2340 which is an external storagedevice. The ICH 14 includes therein a USB controller for controlling aUSB device such as the USB-HDD 2340.

Now, the configurations of the USB-HDD 2340 and the informationprocessing apparatus for controlling the USB-HDD 2340 are described withreference to FIG. 24 . FIG. 24 is a block diagram showing primary partsof the information processing apparatus according to the eighthembodiment.

As shown in FIG. 24 , the USB-HDD 2340 comprises a controller 2341, anHDD 2342, and an SSD 2343.

The HDD 2342 and the SSD 2343 are storages conforming to an ATAstandard. The controller 2341 is a bridge device that converts aUSB-standard command and an ATA-standard command. The USB/ATA bridgecontroller 2341 converts a USB-standard command issued from a USBcontroller 14B to an ATA-standard command, and issues the convertedcommand to the HDD 2342 or the SSD 2343. The controller 2341 converts anATA-standard command issued from the HDD 2342 or the SSD 2343 to aUSB-standard command, and issues the converted command to the USBcontroller 14B.

At least part of the area in the SSD 2343 is used as a cache device forthe HDD 2342. The cache driver 2320 secures, in the main memory 13, anarea for storing cache management information 2401, and then startscache control processing. The cache management information 2401 has datafor managing cache data such as a cache directory. The cache driver 2320records, in the cache management information 2401 within the main memory13, data for managing learned data in a write cache and a read cache. Atshutdown, the cache driver 2320 records, in the SSD 2343, the cachemanagement information 2401 within the main memory 13 as the cachemanagement information 2411. At startup, the cache managementinformation 2411 is loaded into the main memory 13 by the cache driveras the cache management information 2401.

The USB-HDD 2340 may be connected not only to a computer 2300 in whichthe driver 2320 is installed but also to a computer in which no driveris installed for data exchange. When the entire area in the SSD 2343 isused as the cache for the HDD 2342, the computer in which no cachedriver is installed does not need to show the SSD 2343 to the OS of thecomputer in which no driver is installed. If the SSD 2343 is shown tothe OS of the computer in which no driver is installed, internalresources are consumed by the operation of a mechanism or operating theSSD 2343, or the sight of the device that cannot be used unnecessaryconfuses the user. In the present embodiment, the SSD is shown to the OSonly when necessary.

When loaded into the main memory 13 and operable, the cache driver 2320issues a “cache driver operation start notification” to the USB-HDD2340. The controller 2341 shows the HDD 2342 alone to an OS 110 afterpower application. On receipt of the “cache driver operation startnotification” issued from the cache driver 2320, the controller 2341shows the SSD 2343 to the OS 110.

The operations of the controller 2341 and the cache driver 2320 afterpower application are described with reference to the flowchart in FIG.25 .

When power is applied, the controller 2341 shows the HDD 2342 to thecomputer (PC) 2300 (block 2501). When the cache driver 2320 is loadedinto the main memory 13 and is ready to perform processing, the cachedriver 2320 issues a driver operation start notification to thecontroller 2341 (block 2502). On receipt of the driver operation startnotification, the controller 2341 shows the SSD 2343 to the computer2300 (block 2503). The cache driver 2320 issues a read access requestfor the cache management information 2411 to the controller 2341 (block405). The controller 2341 transfers the cache management information2411 to the cache driver 2320 in response to the request (block 406).The cache driver 2320 stores the transferred cache managementinformation 2411 in the main memory 13 as the cache managementinformation 2401 (block 407). After storing the cache managementinformation 2401, the cache driver 2320 starts the management of thecache data in the hard disk drive 2342 (block 408).

According to the present embodiment, the HDD 2342 and the SSD 2343 areshown to the computer 2300. Thus, even an OS that can only issue onecommand to the same device at the same time can issue commands to boththe HDD and the SSD at the same time.

Ninth Embodiment Write Trace

The configurations of a USB-HDD 2340 and an information processingapparatus for controlling the USB-HDD 2340 are described with referenceto FIG. 26 . FIG. 26 is a block diagram showing primary parts of aninformation processing apparatus according to the ninth embodiment.

A cache driver 2320 is loaded into a main memory 13 when the computer isstarted, and starts operation. When a shutdown notification is receivedfrom an OS 110, the cache driver 2320 stores cache managementinformation 2401 such as a cache directory in a management data area ofan SSD 2343 as cache management information 2411.

When the computer is restarted, the cache driver 2320 is again loadedinto the main memory 13, and starts operation. A module which controlsan HDD before a cache driver such as BIOS operates may have no functionto manage a cache. In this case, if data written via the module hits acache, the cache driver does not know that the data in the HDD has beenrewritten. Therefore, there is data inconsistency between the HDD andthe cache.

When the USB-HDD 2340 is used in another computer, it is unknown thatdata in an HDD 2342 has been rewritten. Therefore, there may be datainconsistency between the HDD 2342 and the SSD 2343, so that it isnecessary to invalidate all cache data.

According to the present embodiment, data learned before restart can beused without data inconsistency in such a case.

A controller 2641 of the USB-HDD 2340 has a function of tracing a writecommand issued from a host, and a function of managing a trace validflag.

The controller 2641 records, for example, trace data and the trace validflag in trace management information 2613 provided in the HDD 2342. Asshown in FIG. 27 , the trace management information 2613 has a tracevalid flag 2701 and a trace area 2702. The trace management information2613 can be referred to and changed by both the controller 2641 and thecache driver 2320. if recorded in a nonvolatile storage device, a traceresult and the trace valid flag do not have to be recorded in the SSD2343.

The initial value of the trace valid flag 2701 is “OFF”. When the valueof the trace valid flag is “ON”, the controller 2641 records a targetaddress of the write command in the trace area 2702. When the trace areais full, the controller 2641 sets the value of the trace valid flag to“OFF”.

The cache driver 2320 refers to the value of the trace valid flag 2701at the start of operation. When the value is “OFF”, the cache driver2320 judges that the consistency of the cache cannot be ensured, and thecache driver 2320 initializes the cache management information 2401 inthe main memory 13 so that nothing is recorded in cache data 2412. Whenthe value is “ON”, the cache driver 2320 refers to the trace data in thetrace area 2702. When an address written in a period in which the cachedriver is not in operation hits the cache, the cache driver 2320invalidates the cache data. After completing processing for all thetrace data, the cache driver 2320 sets the value of the trace valid flagto “OFF”. When the cache driver 2320 receives a shutdown notificationfrom the OS 110 and shutdown processing is completed, and whenprocessing for safe removal of the USB-HDD 2340 is completed, the cachedriver 2320 sets the trace valid flag to “ON”.

The procedure of processing performed by the controller is describedwith reference to the flowchart in FIG. 28 .

The controller 2641 refers to the value of the trace valid flag 2701 atthe start of operation, and judges whether the value is “ON” (block2801). When judging that the value is “ON” (Yes in block 2801), thecontroller 2641 judges whether access, if any, is write access (step2802). When judging that the access is write access (Yes in block 2802),the controller 2641 judges whether trace data can be recorded in thetrace area 2702 (block 2803). When judging that the trace data can berecorded (Yes in block 2803), the controller 2641 records the trace datain the trace area 2702 (block 2803). When judging that the trace datacannot be recorded (No in block 2803), the controller 2641 rewrites thevalue of the trace valid flag 2701 to “OFF” (block 2805).

Now, the procedure of processing performed by the cache driver 2320 isdescribed with reference to the flowchart in FIG. 29 .

The cache driver 2320 refers to the value of the trace valid flag 2701at the start of operation, and judges whether the value is “ON” (block2901). When judging that the value is not “ON” (No in block 2901), thecache driver 2320 initializes the cache management information 2401 inthe main memory 13 so that nothing is recorded in cache data 2412 (block2908). When judging that the value is “ON” (Yes in block 2901), thecache driver 2320 reads the cache management information 2411 in the SSD2343 into the area of the cache management information 2401 of the mainmemory 13, and processes trace data. The cache driver 2320 judgeswhether there is any trace data that is not read in the trace area 2702(block 2902). When judging that there is such trace data (Yes in block2902), the cache driver 2320 reads one item of trace data from the tracearea 2702 (block 2903). The cache driver 2320 judges by the cachemanagement information 2401 whether data corresponding to an addressrecorded in the trace data hits the cache data (block 2904). Whenjudging that the data hits the cache data (Yes in block 2904), the cachedriver 2320 destroys tag data corresponding to the trace data (block2905). When judging that the data misses the cache data (No in block2904), the cache driver 2320 sequentially performs processing from block2902 after block 2905. When judging that there is no trace data (No inblock 2902), the cache driver 2320 rewrites the value of the trace validflag 2701 to “OFF” (block 2906). After block 2906, when the shutdownprocessing is completed or when the processing for safe removal of theUSB-HDD 2340 is completed, the cache driver 2320 rewrites the value ofthe trace valid flag 2701 to “ON” (block 2907).

The present embodiment can be used not only to operate a hybrid HDD butalso to operate a cache by the HDD 2342 and the SSD 2343 that areindependent as shown in FIG. 30 . In this case, a controller 3001 whichhas a function of tracing a write command issued from the host, and afunction of managing a nonvolatile trace valid flag is provided in theHDD 2342.

In the present embodiment, the command to write in the HDD is traced, sothat this HDD is used in an environment in which the cache driver 2320is not in operation. Even when some data are rewritten, the rewrittendata alone is invalidated without invalidating the whole cache, andother data can be valid.

Tenth Embodiment Write Trace+Identifier

In the present embodiment, a function is added to an HDD control module.Thus, even after the restart of a computer system, data learned beforethe restart can be used. Data consistency” is ensured even if an HDD isrewritten by another computer system that has the same cache driver.

Now, the configurations of a USB-HDD 2340 and an information processingapparatus for controlling the USB-HDD 2340 are described with referenceto FIG. 31 . FIG. 31 is a block diagram showing primary parts of theinformation processing apparatus according to the tenth embodiment.

A controller 3141 of the USB-HDD 2340 has a function of tracing a writecommand issued from a host, and a function of managing a cache driveridentifier.

The controller 3141 records, for example, trace data and the cachedriver identifier in trace management information 3101 provided in anHDD 2342. As shown in FIG. 32 , the trace management information 3101has a cache driver identifier storage area 3201 and a trace area 2702.When the cache driver identifier storage area 3201 is clear, this meansthat no cache driver identifier is stored. The initial value of thecache driver identifier storage area 3201 indicates a clear state. Thetrace management information 3101 can be referred to and changed by boththe controller 3141 and a cache driver 3120. If recorded in anonvolatile storage device, a trace result and the trace valid flag donot have to be recorded in the hard disk drive 2342.

When the cache driver identifier storage area 3201 is not clear, thecontroller 3141 records a target address of a write command in the tracearea 2702. When the trace area 2702 is full, the cache driver identifierstorage area 3201 is cleared.

The cache driver 3120 generates a unique identifier 3120A foridentifying itself. Even the same cache driver has different identifiersif this cache driver operates in different computers. For example, thecache driver 3120 generates the identifier 3120A on the basis of theinstallation time of the cache driver 3120. The cache driver 3120 alsogenerates the identifier 3120A on the basis of the ID of the HDD inwhich an operating system is installed. The cache driver 3120 alsogenerates the identifier 3120A on the basis of the ID of the computer.The cache driver 3120 also generates the identifier 3120A on the basisof the ID of the operating system of the cache driver 3120. The cachedriver 3120 also generates the identifier 3120A on the basis offingerprint data used by the operating system of the cache driver 3120to indicate the fingerprint of the user.

The cache driver 3120 refers to the cache driver identifier in the cachedriver identifier storage area 3201 and the cache driver identifier3120A in the driver 3120 at the start of operation, and judges whetherthe two identifiers correspond to each other. When the two identifiersdo not correspond to each other, the cache driver 3120 judges that cacheconsistency cannot be ensured, and destroys all the contents of thecache.

When the two identifiers correspond to each other, the cache driver 3120refers to the trace data in the trace area 2702. When an address writtenin a period in which the cache driver is not in operation hits thecache, the cache driver 3120 invalidates the cache data. Aftercompleting processing for all the trace data, the cache driver 3120clears the cache driver identifier storage area 3201. When the cachedriver 3120 receives a shutdown notification from an OS 110 and shutdownprocessing is completed, and when processing for safe removal of theUSB-HDD 2340 is completed, the cache driver 3120 writes its identifier3120A in the cache driver identifier storage area 3201.

The procedure of processing performed by the controller 3141 isdescribed with reference to the flowchart in FIG. 33 .

The controller 3141 judges whether the identifier is clear at the startof operation (block 3301). When judging that the identifier is not clear(No in block 3301), the controller 3141 judges whether access, if any,is write access (block 3302). When judging that the access is writeaccess (Yes in block 3302), the controller 3141 judges whether tracedata can be recorded in the trace area 2702 (block 3303). When judgingthat the trace data can be recorded (Yes in block 3303), the controller3141 records the trace data in the trace area 2702 (block 3303). Whenjudging that the trace data cannot be recorded (No in block 3303), thecontroller 3141 clears the value of the cache driver identifier storagearea 3201 (block 3305).

Now, the procedure of processing performed by the cache driver 3120 isdescribed with reference to the flowchart in FIG. 34 .

The cache driver 3120 judges whether the value of the identifier 3120Acorresponds to the value stored in the cache driver identifier storagearea 3201 at the start of operation (block 3401). When judging that thevalues do not correspond to each other (No in block 3401), the cachedriver 3120 initializes cache management information 2401 in a mainmemory 13 so that nothing is recorded in cache data 2412 (block 3408).When judging that the values correspond to each other (Yes in block3401), the cache driver 3120 reads the cache management information inan SSD 2343 into the area of the cache management information 2401 ofthe main memory 13, and processes trace data. The cache driver 3120judges whether there is any trace data in the trace area 2702 (block3402). When judging that there is trace data (Yes in block 3402), thecache driver 3120 reads one item of trace data from the trace area 2702(block 3403). The cache driver 3120 judges by the cache managementinformation 2401 whether data corresponding to an address recorded inthe trace data hits the cache data (block 3404). When judging that thedata hits the cache data (Yes in block 3404), the cache driver 3120destroys tag data corresponding to the trace data (block 3405). Whenjudging that the data does not hit the cache data (No in block 3404),the cache driver 3120 sequentially performs processing from block 3402after block 3405. When judging that there is no trace data (No in block3402), the cache driver 3120 clears the data in the cache driveridentifier storage area 3201 (block 3406). After block 3406 and afterblock 3408, when the shutdown processing is completed or when theprocessing for safe removal of the USB-HDD 2340 is completed, the cachedriver 3120 writes the value of the identifier 3120A into the cachedriver identifier storage area 3201 (block 3407).

The ninth embodiment is effective when the HDD is alternately used in acomputer in Which the cache driver is in operation and in anothercomputer in which the cache driver is not in operation. However, it hasbeen impossible to ensure data consistency when there are computershaving the same cache driver and the HDD is alternately used in thosecomputers. For example, the HDD is connected to a computer A, and whenthe HDD is safely removed, the flag is turned on. However, if this HDDis connected to a computer B, the flag is turned off when the cachedriver starts operation, so that write access is not traced. If this HDDis safely removed from the computer B and connected to the computer A,the flag is on and there is no trace data despite the data written inthe computer B.

According to the present embodiment, the unique identifier generated bythe driver is used for management instead of the flag. Therefore, cacheconsistency can be maintained even if the HDD is moved among computershaving cache drivers.

The various modules of the systems described herein can be implementedas software applications, hardware and/or software modules, orcomponents on one or more computers, such as servers. While the variousmodules are illustrated separately, they may share some or all of thesame underlying logic or code.

While certain embodiments have been described, these embodiments havebeen presented by way of example only, and are not intended to limit thescope of the inventions. Indeed, the novel embodiments described hereinmay be embodied in a variety of other forms; furthermore, variousomissions, substitutions and changes in the form of the embodimentsdescribed herein may be made without departing from the spirit of theinventions. The accompanying claims and their equivalents are intendedto cover such forms or modifications as would fall within the scope andspirit of the inventions.

What is claimed is:
 1. An information processing apparatus comprising: astorage device comprising a controller, a first nonvolatile storagemodule, and a second nonvolatile storage module whose access speed ishigher than an access speed of the first nonvolatile storage module; avolatile memory; and a processor outside of the storage device andconfigured to: execute an operating system and a cache driver that areloaded into the volatile memory, the cache driver using at least part ofan area in the second nonvolatile storage module as a cache for thefirst nonvolatile storage module; store, in the volatile memory, firstcache management information to manage cache data cached in the secondnonvolatile storage module; at shutdown of the information processingapparatus, request the controller to write the first cache managementinformation into the second nonvolatile storage module as second cachemanagement information, wherein, at startup of the informationprocessing apparatus, the controller uses, by referring to the secondcache management information, the at least part of the area in thesecond nonvolatile storage module as the cache for the first nonvolatilestorage module.
 2. The apparatus of claim 1, wherein the cache driver isconfigured to store, in the volatile memory, first cache managementinformation to manage cache data stored in the second nonvolatilestorage module, and the cache driver is configured to store, in thefirst nonvolatile storage module or the second nonvolatile storagemodule as second cache management information, the first cachemanagement information stored in the volatile memory at shutdown of theapparatus.
 3. The apparatus of claim 2 claim 1, wherein the controlleris configured to execute read cache control processing and cachemanagement information managing processing, using at least part of thearea in the second nonvolatile storage module as a read cache device ofthe first nonvolatile storage module based on the second cachemanagement information at the startup of the apparatus.
 4. The apparatusof claim
 3. wherein the cache driver is configured to issue an operationstart notification to the controller after the cache driver is loadedinto the volatile memory, and the controller is configured to stop theexecution of the read cache control processing and the cache managementinformation managing processing in response to the operation startnotification.
 5. The apparatus of claim 3, wherein the controller isconfigured to write, into the second cache management information, datato identify data for which a read access request is made at the startupof the apparatus.
 6. The apparatus of claim 5, wherein the cache driveris configured to rewrite the data which identifies the data for whichthe read access request is made at the startup to a condition in whichthe read access request is not made when a write access request isissued to the an area where the data for which the read access requestis once made at the startup is stored.
 7. The apparatus of claim 2 claim1, wherein the controller is configured to write a first value into oneof the first and second nonvolatile storage module modules at normalshutdown of the apparatus, and the cache driver is configured to judgewhether the first value is written in the one of the first and secondnonvolatile storage module modules after the cache driver is loaded intothe volatile memory, and the cache driver is configured to rewrite thefirst value to a second value when the cache driver judges that thefirst value is written, and the cache driver is configured to invalidatethe cache data in the second nonvolatile storage module when the cachedriver judges that the first value is not written.
 8. The apparatus ofclaim 1, wherein the cache driver is configured to use at least part ofthe area in the second nonvolatile storage module as a cache for thefirst nonvolatile storage module and the a second storage device whenthe second storage device is connected to the apparatus.
 9. Theapparatus of claim 1, wherein the operating system is configured torecognize the first nonvolatile storage module and the secondnonvolatile storage module as independent storage devices.
 10. Theapparatus of claim 1, wherein the first nonvolatile storage modulecomprises a hard disk drive, and the second nonvolatile storage modulecomprises a flash memory.
 11. An information processing apparatuscomprising: a first nonvolatile storage device; a second nonvolatilestorage device whose access speed is higher than an access speed of thefirst nonvolatile storage device; a volatile memory; a controller; and aprocessor configured to: execute an operating system and a cache driverthat are loaded into the volatile memory, the cache driver using atleast part of an area in the second nonvolatile storage device as acache for the first nonvolatile storage device; store, in the volatilememory, first cache management information to manage cache data cachedin the second nonvolatile storage module; at shutdown of the informationprocessing apparatus, request the controller to write the first cachemanagement information into the second nonvolatile storage module assecond cache management information, wherein, at boot-up of theinformation processing apparatus, the controller uses, by referring tothe second cache management information, the at least part of the areain the second nonvolatile storage module as the cache for the firstnonvolatile storage module.
 12. The apparatus of claim 11, furthercomprising an external additional bus, wherein the second nonvolatilestorage device is connected to the external additional bus.
 13. Theapparatus of claim 11, wherein the first nonvolatile storage devicecomprises a the controller, the controller is configured to record, inthe first nonvolatile storage device, an address of data for which awrite access request is made when a value stored in a flag area of thefirst nonvolatile storage device is a first value, the controller isconfigured to rewrite the first value in the flag area to a second valuewhen the address is not allowed to be recorded in the first nonvolatilestorage device, the cache driver is configured to judge whether thefirst value is recorded in the flag area at start of operation of thecache driver, the cache driver is configured to invalidate all the cachedata in the second nonvolatile storage device when the cache driverjudges that the first value is not recorded, the cache driver isconfigured to invalidate the cache data in the second nonvolatilestorage device in accordance with the address of the data for which thewrite access request is made when the cache driver judges that the firstvalue is recorded, the cache driver is configured to rewrite the valuein the flag area to the second value after the cache driver invalidatesall the cache data in the second nonvolatile storage device or after thecache driver invalidates the cache data in the second nonvolatilestorage device in accordance with the address of the data for which thewrite access request is made, and the cache driver is configured torecord the first value in the flag area at the shutdown of the apparatusor at the completion of processing of the operating system associatedwith normal removal of the second nonvolatile storage device.
 14. Theapparatus of claim 11, wherein the controller is configured to record,in the first nonvolatile storage device, an address of data for which awrite access request is made when an identifier recorded in anidentifier storage area of the first nonvolatile storage device is avalid value, the controller is configured to set the a value in theidentifier storage area to an invalid value when the address is notallowed to be recorded in the first nonvolatile storage device, thecache driver is configured to generate the identifier, the cache driveris configured to judge whether the identifier stored in the identifierstorage area and the generated identifier correspond to each other atthe start of operation of the cache driver, the cache driver isconfigured to invalidate all the cache data in the second nonvolatilestorage device when the cache driver judges that the identifier storedin the identifier storage area and the generated identifier do notcorrespond to each other, the cache driver is configured to invalidatethe cache data in the second nonvolatile storage device in accordancewith the address of the data for which the write access request is madewhen the cache driver judges that the identifier stored in theidentifier storage area and the generated identifier correspond to eachother, the cache driver is configured to set the value in the identifierstorage area to an invalid value after the cache driver invalidates allthe cache data in the second nonvolatile storage device or after thecache driver invalidates the cache data in the second nonvolatilestorage device in accordance with the address of the data for which thewrite access request is made, and the cache driver is configured torecord the identifier in the identifier storage area at the shutdown ofthe apparatus or at the completion of processing of the operating systemassociated with normal removal of the second nonvolatile storage device.15. The apparatus of claim 11, wherein the first nonvolatile storagedevice comprises a hard disk drive, and the second nonvolatile storagedevice comprises a flash memory.
 16. A cache control method of aninformation processing apparatus which comprises a storage device, thestorage device comprising a controller, a first nonvolatile storagemodule, and a second nonvolatile storage module whose an access speed ishigher than an access speed of the first nonvolatile storage module, themethod comprising: executing, by a processor which executes an operatingsystem, a cache driver which uses at least part of an area in the secondnonvolatile storage module as a cache for the first nonvolatile storagemodule.